<!doctype html>
<html>
<head>
    <script src="../js/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp">

    <div ng-controller="FirstController">
        <h4>The simplest adding machine ever</h4>
        <button ng-click="add(1)">Add</button>
        <h4>
            Current count:{{counter}}
        </h4>
    </div>



</div>
<script type="text/javascript">

    var app = angular.module("myApp",[]);
    app.controller('FirstController',function($scope){
        $scope.counter = 0;
        $scope.add = function(amount){
            $scope.counter += amount
        }
    });

</script>
</body>
</html>